/**
 * @Author: 陈瑞鹏
 * @Date:   2022-12-14 10:10:17
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-12-14 10:37:23
 */
import mongoose from "mongoose";

const Schema = mongoose.Schema;
const BarrackSchema: mongoose.Schema = new Schema({
  id: { type: Number, display: "兵营id" },
  roleId: { type: Number, display: "角色id", index: true },
  lock: { type: Boolean, display: "是否解锁,true未解锁 false已解锁", default: true },
  level: { type: Number, display: "等级", default: 1 },
  fragment: { type: Number, diplay: "碎片数量", default: 0 },
  updateTime: { type: String, display: '更新时间' },
  createTime: { type: String, display: '创建时间' },
}).index({ roleId: 1 });

const Barrack = mongoose.model("Barrack", BarrackSchema);
export default Barrack;